﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Medianamik.UI.Lock;
using NUnit.Framework;
using Medianamik.Core.Lock;

namespace Medianamik.Tests.Unit.Medianamik.UI.Lock
{
    [TestFixture]
    public class LockInfoTest
    {
        private string _expectedUserId = "expectedUser";
        private LockInfo _actualLockInfo;
        [SetUp]
        public void Init()
        {
            _actualLockInfo = new LockInfo(_expectedUserId, DateTime.Now, new TimeSpan(), Guid.Empty);
        }

        [Test]
        public void User_should_never_be_empty_or_null()
        {
            _actualLockInfo = new LockInfo(null, DateTime.Now, new TimeSpan(), Guid.Empty);
            Assert.That(_actualLockInfo.User, Has.Length.AtLeast(1));
        }
        [Test]
        public void user_value_set_in_the_constructor_should_be_equal_to_User()
        {

            Assert.That(_actualLockInfo.User, Is.EqualTo(_expectedUserId));
        }
    }
}